package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.core.domain.BaseVo;
import lombok.Data;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * 金蝶-发票-应付单/采购开票明细对象 erp_king_invoice_payable_detail_info
 *
 * @author wutao
 * @date 2024-06-26
 */
@TableName ( "erp_king_invoice_payable_detail_info" )
@ApiModel ( value = "erp_king_invoice_payable_detail_info对象", description = "金蝶-发票-应付单/采购开票明细" )
@Data
public class KingInvoicePayableDetailEntity extends BaseVo {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId ( value = "id", type = IdType.INPUT )
    private String id;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "应付单/采购开票Id" )
    @TableField ( "invoice_payable_id" )
    @Excel ( name = "应付单/采购开票" )
    private String invoicePayableId;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "物料编码，物料表接口" )
    @TableField ( "material_id" )
    @Excel ( name = "物料编码，物料表接口" )
    private String materialId;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "物料编码，当应付单类型为：标准应付单时使用该字段" )
    @TableField ( "material_code" )
    @Excel ( name = "物料编码，物料表接口" )
    private String materialCode;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "费用项目编码，当应付单类型为：费用应付单时使用该字段" )
    @TableField ( "fee_code" )
    @Excel ( name = "物料编码，物料表接口" )
    private String feeCode;

    /**
     * 计量单位
     */
    @ApiModelProperty ( "计价单位" )
    @TableField ( "unit" )
    @Excel ( name = "计价单位" )
    private String unit;

    /**
     * 数量
     */
    @ApiModelProperty ( "数量" )
    @TableField ( "num" )
    @Excel ( name = "数量" )
    private String num;

    /**
     * 含税单价
     */
    @ApiModelProperty ( "含税单价" )
    @TableField ( "tax_price" )
    @Excel ( name = "含税单价" )
    private String taxPrice;

    @ApiModelProperty ( "单价" )
    @TableField ( "price" )
    @Excel ( name = "单价" )
    private String price;

    /**
     * 税率
     */
    @ApiModelProperty ( "税率，显示具体数额" )
    @TableField ( "rate" )
    @Excel ( name = "税率" )
    private String rate;

    /**
     * 折扣率
     */
    @ApiModelProperty ( "折扣率" )
    @TableField ( "discount_rate" )
    @Excel ( name = "折扣率" )
    private String discountRate;

    /**
     * 折扣额
     */
    @ApiModelProperty ( "折扣额" )
    @TableField ( "discount_amount" )
    @Excel ( name = "折扣额" )
    private String discountAmount;

    /**
     * 不含税金额
     */
    @ApiModelProperty ( "不含税金额" )
    @TableField ( "not_tax_amount" )
    @Excel ( name = "不含税金额" )
    private String notTaxAmount;

    /**
     * 税额
     */
    @ApiModelProperty ( "税额" )
    @TableField ( "rate_amount" )
    @Excel ( name = "税额" )
    private String rateAmount;

    /**
     * 价税合计
     */
    @ApiModelProperty ( "价税合计" )
    @TableField ( "total_tax_price" )
    @Excel ( name = "价税合计" )
    private String totalTaxPrice;

    @ApiModelProperty ( "不含税金额本位币" )
    @TableField ( "not_tax_amount_currency" )
    @Excel ( name = "不含税金额本位币" )
    private String notTaxAmountCurrency;

    @ApiModelProperty ( "税额本位币" )
    @TableField ( "rate_amount_currency" )
    @Excel ( name = "不含税金额本位币" )
    private String rateAmountCurrency;

    @ApiModelProperty ( "价税合计本位币" )
    @TableField ( "total_tax_price_currency" )
    @Excel ( name = "价税合计本位币" )
    private String totalTaxPriceCurrency;

    /**
     * 是否赠品
     */
    @ApiModelProperty ( "是否赠品；1：是；2：否" )
    @TableField ( "is_gift" )
    @Excel ( name = "是否赠品" )
    private Boolean isGift;

    /**
     * 计价基本数量
     */
    @ApiModelProperty ( "计价基本数量" )
    @TableField ( "base_unit" )
    @Excel ( name = "计价基本数量" )
    private String baseUnit;

    @ApiModelProperty ( "库存数量" )
    @TableField ( "inventory_num" )
    @Excel ( name = "库存数量" )
    private String inventoryNum;

    /**
     * 批号
     */
    @ApiModelProperty ( "批号" )
    @TableField ( "batch_num" )
    @Excel ( name = "批号" )
    private String batchNum;

    /**
     * 源单类型，表示该应付单从何而来
     * 1、手动新增
     * 2、采购订单
     * 3、采购入库单
     */
    @ApiModelProperty ( "源单类型，根据实际选择下推的单据类型：" +
            "1；手动新增；\n" +
            "2：采购订单；\n" +
            "3：采购入库单；\n" +
            "4：采购退料单\n" +
            "5：冲红应付单；" )
    @TableField ( "source_doc_type" )
    @Excel ( name = "源单类型" )
    private Integer sourceDocType;

    @ApiModelProperty ( "源单Id，下推该应付单的父单据表头Id" )
    @TableField ( "source_id" )
    @Excel ( name = "源单" )
    private String sourceId;

    @ApiModelProperty ( "源单编号" )
    @TableField ( "source_doc_no" )
    @Excel ( name = "源单" )
    private String sourceDocNo;

    @ApiModelProperty ( "源单行号" )
    @TableField ( "source_line_number" )
    @Excel ( name = "源单行号" )
    private String sourceLineNumber;

    @ApiModelProperty ( "源单物料明细id" )
    @TableField ( "source_material_detail_id" )
    @Excel ( name = "源单物料明细id" )
    private String sourceMaterialDetailId;

    @ApiModelProperty ( "采购订单Id" )
    @TableField ( "order_id" )
    private String orderId;

    @ApiModelProperty ( "采购订单编号" )
    @TableField ( "order_code" )
    @Excel ( name = "采购订单编号" )
    private String orderCode;

    @ApiModelProperty ( "采购订单行号" )
    @TableField ( "order_line_number" )
    @Excel ( name = "采购订单编号" )
    private String orderLineNumber;

    /**
     * 所属公司,当前登录公司
     */
    @ApiModelProperty ( "入库单号，dialog入库单" )
    @TableField ( "in_storage_no" )
    @Excel ( name = "入库单号" )
    private String inStorageNo;

    @ApiModelProperty ( "出库单号，dialog出库单" )
    @TableField ( "out_storage_no" )
    @Excel ( name = "出库单号" )
    private String outStorageNo;

    /**
     * 所属公司,当前登录公司
     */
    @ApiModelProperty ( "所属公司,当前登录公司" )
    @TableField ( "dept_id" )
    @Excel ( name = "所属公司,当前登录公司" )
    private String deptId;

    @ApiModelProperty ( "行号" )
    @TableField ( "line_number" )
    private String lineNumber;

    /**
     * 所属公司,当前登录公司
     */
    @ApiModelProperty ( "是否计入采购成本；1：是；2：否" )
    @TableField ( "is_include_procure_cost" )
    @Excel ( name = "是否计入采购成本" )
    private Boolean isIncludeProcureCost;

    /**
     * 所属公司,当前登录公司
     */
    @ApiModelProperty ( "是否计入合同履约成本；1：是；2：否" )
    @TableField ( "is_include_contract_cost" )
    @Excel ( name = "是否计入合同履约成本" )
    private Boolean isIncludeContractCost;

    /**
     * 所属公司,当前登录公司
     */
    @ApiModelProperty ( "费用承担部门，dialog关联部门表" )
    @TableField ( "bear_dept_code" )
    @Excel ( name = "费用承担部门" )
    private String bearDeptCode;

    @ApiModelProperty ( "是否可用" )
    @TableField ( "is_used" )
    @Excel ( name = "是否可用" )
    private Integer isUsed;

    @TableField ( "remarks" )
    private String remarks;

    @ApiModelProperty("是否释放，默认false不释放，当红冲应付单审核后，释放源应付单，表示源应付单的源单后续还可以再推")
    @TableField ( "is_release" )
    private Boolean isRelease;

    @TableField ( "create_by" )
    private String createBy;

    /**
     * 创建时间
     */
    @TableField ( "create_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    /**
     * 更新者
     */
    @TableField ( "update_by" )
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField ( "update_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @ApiModelProperty ( "物料名称，仅用于回显" )
    @TableField ( exist = false )
    @Excel ( name = "物料名称" )
    private String materialName;

    @ApiModelProperty ( "费用项目名称，仅用于回显" )
    @TableField ( exist = false )
    @Excel ( name = "费用项目名称" )
    private String feeName;

    @ApiModelProperty ( "费用承担部门名称，仅用于回显" )
    @TableField ( exist = false )
    @Excel ( name = "费用承担部门名称" )
    private String bearDeptName;

    @ApiModelProperty ( "主表价税合计，平账使用反写到主表" )
    @TableField ( exist = false )
    private String payableTaxPrice;

    @ApiModelProperty ( "计价单位" )
    @TableField ( exist = false )
    private String unitName;

}
